package com.db.williamchart.data;

public class Paddings {

    private float left;
    private float top;
    private float right;
    private float bottom;

    public Paddings(float left,float top,float right,float bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
    }

    public Paddings mergeWith(Paddings paddings) {
        return new Paddings(
                Math.max(this.left, paddings.left),
                Math.max(this.top, paddings.top),
                Math.max(this.right, paddings.right),
                Math.max(this.bottom, paddings.bottom)
        );
    }

    public float getLeft() {
        return left;
    }

    public float getTop() {
        return top;
    }

    public float getRight() {
        return right;
    }

    public float getBottom() {
        return bottom;
    }
}
